#!/bin/bash

# Тест работы отладчика SBL

echo "Тест работы отладчика SBL ====================================" > test/tmp/test-interpret-simodo-script-debug.out

for file in test/source/simodo-script/debug/*.simodo-script
do
    echo "--- ${file} :" >> test/tmp/test-interpret-simodo-script-debug.out
    cat ${file} >> test/tmp/test-interpret-simodo-script-debug.out
    echo "--- interpret :" >> test/tmp/test-interpret-simodo-script-debug.out
    bin/simodo-interpret -m math ${file} -d >> test/tmp/test-interpret-simodo-script-debug.out
done

echo "Тест работы отладчика с точками останова =====================" >> test/tmp/test-interpret-simodo-script-debug.out

for file in test/source/simodo-script/debug/*.simodo-script
do
    echo "--- ${file} :" >> test/tmp/test-interpret-simodo-script-debug.out
    cat ${file} >> test/tmp/test-interpret-simodo-script-debug.out
    echo "--- interpret :" >> test/tmp/test-interpret-simodo-script-debug.out
    bin/simodo-interpret -m math ${file} -b 7 -b primes. 11 -b asynch-01 12 >> test/tmp/test-interpret-simodo-script-debug.out
done

exit 0
